package com.ean.backpack.service.impl;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import com.ean.backpack.domain.Pointsofinterestcoordinateslist;
import com.ean.backpack.repository.PointsofinterestcoordinateslistRepository;
import com.ean.backpack.service.PointsofinterestcoordinateslistService;

@Service
@Transactional
public class PointsofinterestcoordinateslistServiceImpl implements
		PointsofinterestcoordinateslistService {

	@Autowired
	PointsofinterestcoordinateslistRepository pointsofinterestcoordinateslistRepository;

	public long countAllPointsofinterestcoordinateslists() {
		return pointsofinterestcoordinateslistRepository.count();
	}

	public void deletePointsofinterestcoordinateslist(
			Pointsofinterestcoordinateslist pointsofinterestcoordinateslist) {
		pointsofinterestcoordinateslistRepository
				.delete(pointsofinterestcoordinateslist);
	}

	public Pointsofinterestcoordinateslist findPointsofinterestcoordinateslist(
			String id) {
		return pointsofinterestcoordinateslistRepository.findOne(id);
	}

	public List<Pointsofinterestcoordinateslist> findAllPointsofinterestcoordinateslists() {
		return pointsofinterestcoordinateslistRepository.findAll();
	}

	public List<Pointsofinterestcoordinateslist> findPointsofinterestcoordinateslistEntries(
			int firstResult, int maxResults) {
		return pointsofinterestcoordinateslistRepository.findAll(
				new org.springframework.data.domain.PageRequest(firstResult
						/ maxResults, maxResults)).getContent();
	}

	public void savePointsofinterestcoordinateslist(
			Pointsofinterestcoordinateslist pointsofinterestcoordinateslist) {
		pointsofinterestcoordinateslistRepository
				.save(pointsofinterestcoordinateslist);
	}

	public Pointsofinterestcoordinateslist updatePointsofinterestcoordinateslist(
			Pointsofinterestcoordinateslist pointsofinterestcoordinateslist) {
		return pointsofinterestcoordinateslistRepository
				.save(pointsofinterestcoordinateslist);
	}
}
